
public class UseAnimal {
	public void doStuff(Animal a){
		System.out.println("In the Animal version");
	}
	public void dostuff(horse a){
		System.out.println("In the Horse version");
	}
	public static void main(String[] args) {
		UseAnimal ua=new UseAnimal();
		Animal animalObj=new Animal();
		horse horseObj=new horse();
		ua.doStuff(animalObj);
		ua.dostuff(horseObj);
		animalObj=horseObj;
		ua.doStuff(animalObj);
	}
	
}
